package com.wkbb.common.redis;

import com.alibaba.fastjson.JSON;
import com.wkbb.common.dto.common.RedisPropDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStringCommands;
import org.springframework.data.redis.connection.ReturnType;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.core.types.Expiration;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;


/**
 * 封装redis操作接口
 *
 * @author wuxq
 */
@Component
@Slf4j
public class IMRedisTemplateUtil extends RedisTemplateUtil {


//    private RedisTemplate<String, Object> redisTemplate;
//
//    @Autowired
//    public RedisTemplateUtil(@Qualifier("redisTemplate") RedisTemplate<String, Object> redisTemplate) {
//        this.redisTemplate = redisTemplate;
//    }

    @Resource
    private RedisTemplate<String, Object> template3;


    @PostConstruct
    public void init(){
        super.redisTemplate = template3;
    }


}
